import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listInfo(query) {
    return request({
        url: '/supplier/info/list',
        method: 'get',
        params: query
    })
}

export function listInfoType(query) {
    return request({
        url: '/supplier/info/listType',
        method: 'get',
        params: query
    })
}

export function listInfoToActivity(query) {
    return request({
        url: '/supplier/info/listToActivity',
        method: 'get',
        params: query
    })
}

// 查询【请填写功能名称】详细
export function getSupplierInfo(enterpriseId) {
    return request({
        url: '/supplier/info/' + enterpriseId,
        method: 'get'
    })
}

// 新增【请填写功能名称】
export function addInfo(data) {
    return request({
        url: '/supplier/info',
        method: 'post',
        data: data
    })
}

// 修改【请填写功能名称】
export function updateInfo(data) {
    return request({
        url: '/supplier/info',
        method: 'put',
        data: data
    })
}

// 删除【请填写功能名称】
export function delInfo(enterpriseId) {
    return request({
        url: '/supplier/info/' + enterpriseId,
        method: 'delete'
    })
}
export function getMaxEnterpriseNo(industryType) {
    return request({
        url: "/supplier/info/getMaxEnterpriseNo/" + industryType,
        method: "get",

    });
}
export function getEnterpriseName(enterpriseName) {
    return request({
        url: "/supplier/info/getEnterpriseName/" + enterpriseName,
        method: "get",

    });
}
export function saveSupplierBank(data) {
    return request({
        url: "/supplier/info/saveSupplierBank",
        method: "post",
        data
    });
}

export function updateSupplierBank(data) {
    return request({
        url: "/supplier/info/updateSupplierBank",
        method: "post",
        data
    });
}

export function platformOrganization(query) {
  return request({
    url: "/supplier/info/platformOrganization",
    method: "get",
    params: query
  });
}
